{extend name="layouts/main" /}
{block name="main"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">
                    <a>{$dataDetail.id?"编辑":"添加"}用户</a>
                </div>
                <div class="layui-card-body layui-table-body layui-table-main">
                    <form action="/admin/member/doAdd" method="POST" class="layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label">用户名</label>
                            <div class="layui-input-inline">
                                <input type="hidden" name="id" value="{$dataDetail.id}"/>
                                <input type="text" name="user_name" value="{$dataDetail.user_name}" class="layui-input"
                                       placeholder="请输入用户昵称">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">用户昵称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="nick_name" value="{$dataDetail.nick_name}" class="layui-input"
                                       placeholder="请输入用户昵称">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">手机号</label>
                            <div class="layui-input-inline">
                                <input type="text" name="user_phone" value="{$dataDetail.user_phone}" class="layui-input"
                                       placeholder="请输入用户手机号">
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">性别</label>
                            <div class="layui-input-inline">
                                    <input type="radio" name="user_gender" value="0" title="女" {$dataDetail.user_gender==0?"checked":""}>
                                    <input type="radio" name="user_gender" value="1" title="男" {$dataDetail.user_gender==1?"checked":""}>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <label class="layui-form-label">用户邮箱</label>
                            <div class="layui-input-inline">
                                <input type="text" name="user_email" value="{$dataDetail.user_email}" class="layui-input"
                                       placeholder="请输入用户邮箱">
                            </div>
                        </div>


                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                            </div>
                        </div>

                    </form>
                </div>

            </div>
        </div>
    </div>
</div>
<script>
    layui.use('form', function(){
        var form = layui.form;
    });
</script>
{/block}
